jQuery(document).ready(function($) {
	//发布回复
	 $('#btnsave').click(function() {
		var bbname = $.trim($('#bbname').val());
		var sitename = $.trim($('#sitename').val());
		var siteurl = $.trim($('#siteurl').val());
		var icp = $.trim($('#icp').val());
		var bbs_web_root = $.trim($('#bbs_web_root').val());
		if(bbname!='' || sitename!='' || icp!='' || siteurl!='') {
			$.ajax({
			type: "POST",
			url:bbs_web_root+"action/admin/do_settings.php?action=new_post",
				dataType: "",
				data:{'settings[bbname]': bbname,'settings[sitename]':sitename,'settings[siteurl]': siteurl,'settings[icp]':icp},
				success: function(data) {
					//location.reload(bbs_web_root+'admin/index.php?action=base_config');
				}
			});
			
		}else{
			$('div.Messages').remove();
			$('<div class="Messages Information"><ul><li>' + '请输入配置项再保存' + '</li></ul></div>').appendTo('body').show();
			return false;
		}


	 });


});